/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pt.utl.ist.isr.livetrack.tracker.mht;

import org.apache.log4j.Logger;
import pt.utl.ist.isr.livetrack.server.interfaces.Zone;

/**
 *
 * @author David Miguel Antunes <davidmiguel [ at ] antunes.net>
 */
public class TDetection<TargetInfo> {

    private static final Logger logger = Logger.getLogger(TDetection.class);
    private final double[] features;
    private final TargetInfo info;
    private final Zone zone;

    public TDetection(double[] features, TargetInfo info, Zone zone) {
        this.features = features;
        this.info = info;
        this.zone = zone;
    }

    public TargetInfo getTargetInfo() {
        return info;
    }

    public double[] getFeatures() {
        return features;
    }

    public Zone getZone() {
        return zone;
    }

    @Override
    public String toString() {
        String s = "Target detection in " + zone;
        s += " with features=[";
        for (int i = 0; i < features.length; i++) {
            double d = ((int) (features[i] * 1000)) / 1000.0;
            s += d + ", ";
        }
        s += "]";
        return s;
    }
}
